package com.file.system.plugin.validated;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class ValidatorAspect {

    @Around("@annotation(filterWord)")
    public Object filterWord(ProceedingJoinPoint joinPoint, FilterWord filterWord) throws Throwable {
        // 调用被拦截的方法
        Object result = joinPoint.proceed();

        return result;
    }

    @Around("@annotation(releasePath)")
    public Object filterWord(ProceedingJoinPoint joinPoint, ReleasePath releasePath) throws Throwable {
        // 调用被拦截的方法
        Object result = joinPoint.proceed();

        return result;
    }
}